<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>rest 风格</title>
</head>
<body>
    <h2>REST FULL</h2>
    <hr>
    <a th:href="@{/user}">获取所有用户</a><br>
    <a th:href="@{/user/1}">通过id获取用户</a><br>
    <form th:action="@{/user}" method="post">
        用户：<input type="text" name="name"><br>
        密码：<input type="password" name="password"><br>
        <input type="submit" value="添加"><br>
    </form>
    <hr>
<!--    <form th:action="@{/user}" method="put">-->
    <form th:action="@{/user}" method="post">
        <!--put请求使用方法-->
        <input type="hidden" name="_method" value="PUT">
        用户：<input type="text" name="name"><br>
        密码：<input type="password" name="password"><br>
        <input type="submit" value="添加"><br>
    </form>
</body>
</html>